https://leetcode.cn/problems/single-number-ii/description/
class Solution {
public:
    int singleNumber(vector<int>& nums) {
        int ret=0;
        for(int i=0;i<32;i++)
        {
            int countbits=0;
            for(int j=0;j<nums.size();j++)
                countbits+=(nums[j]>>i)&1;
            countbits%=3;
            if(countbits)
            ret=1<<i | ret;
        }
        return ret;
    }
};